package cn.exrick.xboot.modules.transport.service.impl;

import cn.exrick.xboot.common.vo.PageVo;
import cn.exrick.xboot.modules.transport.mapper.CompanyRoutesMapper;
import cn.exrick.xboot.modules.transport.entity.CompanyRoutes;
import cn.exrick.xboot.modules.transport.param.QueryCompanyRoutesParam;
import cn.exrick.xboot.modules.transport.service.CompanyRoutesService;
import cn.exrick.xboot.modules.transport.vo.CompanyRoutesVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 物流公司线路信息接口实现
 * @author gj
 */
@Slf4j
@Service
@Transactional
public class CompanyRoutesServiceImpl extends ServiceImpl<CompanyRoutesMapper, CompanyRoutes> implements CompanyRoutesService {

    @Autowired
    private CompanyRoutesMapper companyRoutesMapper;

    @Override
    public CompanyRoutesVo getRoutesById(Long id) {
        //在mapper中通过id查询，并返回vo
        return companyRoutesMapper.getRoutesById(id);
    }

    @Override
    public IPage<CompanyRoutesVo> getByCondition(Page page, QueryCompanyRoutesParam param) {
        //在mapper中通过条件查询，并返回vo
        return companyRoutesMapper.getByCondition(page, param);
    }


}